perm filename GUIDE.VIS[VIS,HPM]1 blob sn#197493 filedate 1976-01-21 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00004 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	Guide to vision routines on [VIS,HPM]
C00007 00003	VIXHDR.SAI   for displaying grey scale and halftone pictures on data disc.
C00009 00004	Internal picture array format
C00011 ENDMK
C⊗;
Guide to vision routines on [VIS,HPM]

PIXHDR.SAI   utility routines for getting, saving, moving, etc. pictures

	requires: PIXFAI.REL,PIXSAI.REL

	provides:
		  PCLN,PCWD,PCBY,PCBYA,LNWD,LNBY,	where to find things in
		  LNBYA,WDBY,WDBI,BYBI,BPTAB,LINTAB	picture arrays


	VALUE  ←  PIXEL(PICTURE,ROW,COLUMN);		value of a particular pixel
		  PUTEL(PICTURE,ROW,COLUMN,VALUE);	change a pixel

        SIZE   ←  PFLDIM(FILNAME);		size of array needed for pic file
        SIZE   ←  GETPFL(FILNAME,PICTURE);		read in a pic file
		  PUTPFL(PICTURE,FILENAME);		write out PICTURE

        SIZE   ←  PIXDIM(HEIGHT,WIDTH,BITS);	size of array for HxWxB picture
        SIZE   ←  MAKPIX(HEIGHT,WIDTH,BITS,PICTURE);	make blank HxWxB picture
                  WIPE(PICTURE,VALU(0));	make every data wd in a pic=VALU

		  COPPIC(PICTURE1,PICTURE2);  copy pic1 to pic2
		  SHRINK(PICT1,PICT2);        squeeze PICT1 into PICT2
                  PICADD(PICTURE,PICSUM);     add a picture to a picture
		  PICSH(PIC1,PIC2,DIV);       every pixel in PIC1/DIV→PIC2

        NRETRY ←  CAMPIX(CAMERA,YEDGE,XEDGE,PICTURE,
                    SUMS(1),BCLIP(7),TCLIP(0),MAXTRY(100)); read from a camera
                  TVSNAP(CAM,YEDG,XEDG,PIC,BCLIP,TCLIP,NTRY); primitive camera
                  TVRAW(CAM,YEDG,XEDG,PIC,BCLIP,TCLIP,NTRY); routines, used by
                  TVBTMX(PIC4,PICN,XFRM);		     CAMPIX

       SUM     ←  INTRST(PICTURE,WINDOWSIZE,RESULTARRAY);  interest operator
       SIZE    ←  INTERESTDIM(PICTURE,WINDOWSIZE);  pic size needed for intrst op
		  INTEREST(PICTURE,WINDOW,RESULTPICTURE); make interest op picture

       BESTVAL ←  MATCH(PICTURE1,SY1,SX1,SY2,SX2, PICTURE2,DY1,DX1,DY2,DX2);
       BSTCOEF ←  NORCOR(PICTURE1,SY1,SX1,SY2,SX2, PICTURE2,DY1,DX1,DY2,DX2);
                   ;correlators, find Source window in pic1 in Dest in pic2

		  CLEAN(PICTURE);	remove single pixel noise, blurs a little
		  PASSHI(PICTURE1,WINDOWSIZE,PICTURE2);   high pass filter
        SUM    ←  CMPPAR(PICTURE1,PICTURE2);  compare two pics [ sig(x-y)↑2 ]

		  HAFPIC(PICTURE1,PICTURE2,MAXBIT);  reduce pic to half resolution
		  SELECT(PICTURE1,YEDGE,XEDGE,PICTURE2);  take a piece of a pic

		  PERBIT(PICTURE, TRANSFORM); transform each pixel of pic
		  HISTOG(PICTURE, HISTOGRAM); count # of occurences of each gray val
		  ENHANCE(PICTURE);	      make histogram flat

		  ROWSUM(PICTURE1,ROWSUMS);   sum up the pixels in each row
		  ROWSUD(PICTURE1,ROWSUMS);   dirty rowsums
		  SYNCHRONIZE(PICTURE1);      do a vertical roll fixup

                  UNPACK(SOURCEARRAY, PICTURE);   copy a pict into a full wd array
		  GETPAR(ARRY, PICTR);	      copy full word array of pixels to pic

		  EDGEINIT(PICTURE,SIZE);	initialize edge operator
                  EDGE(X,Y,EDGERESULT);		apply edge operator

	NOTE: all picture and other arrays are zero origin in all dimensions
VIXHDR.SAI   for displaying grey scale and halftone pictures on data disc.
		an extension for the display routines in DDSUB.SAI[GRA,HPM]

	requires: PIXHDR.SAI[VIS],DDHDR.SAI[GRA],VIXFAI.REL[VIS]

	provides: VIDEO(X1,Y1,X2,Y2,PICTURE,BIT);
        	  VID(X1,Y1,X2,Y2,PICTURE,BIT);
			display PICTURE between X1,Y1,X2,Y2 in SCREEN
			co-ordinates. If BIT=-1 then a fast, low quality
			halftone, if -2 then a high quality halftone, if
			-3 then a buggy halftone. If positive then BIT
			represents a bit mask, which is anded with each
			pixel. If the result is nonzero, a bit is turned
			on in the corresponding part of the display.
Internal picture array format

	WORD		CONTENTS
	
	0		PCLN   number of scanlines in the picture
	1		PCWD   words in the pixel portion of the picture
	2		PCBY   valid bytes in the picture
	3		PCBYA  bytes in the picture, including null
				bytes at end of each scanline

	4		LNWD   words per scanline
	5		LNBY   valid bytes per scanline
	6		LNBYA  bytes per scanline, including the nulls

	7		WDBY   bytes per word
	8		WDBI   bits in the valid portion of each word

	9		BYBI   bits per byte

	10		BPTAB  address of SECOND entry in byte pointer
				table 12+PCLN+address of array

	11 to 10+PCLN	LINTAB table containg the actual address of the first
				word of each scanline, in obvious order

	11+PCLN to 	table containing byte pointers to samples within
	 11+PCLN+LNBYA		lines, to be added to line address.
				The first entry, when ILDB'ed causes
				loading of the first byte in the line.

	12+PCLN+LNBYA to	the picture
	 11+PCLN+LNBYA+PCWD